package com.maotai.bl.timetask;


import javax.annotation.Resource;

import cn.hellotrue.HelloTrueHY;

import com.maotai.bl.service.BLService;
import com.maotai.bl.thread.BLRegisterThreadHY;

/**
 * 注册
 */
public class BLRegisterTask {

	@Resource(name = "blService")
	private BLService blService;
	
	
	public BLRegisterTask() {
		if("".equals(HelloTrueHY.TOKEN)){
			HelloTrueHY ht = new HelloTrueHY();
			HelloTrueHY.TOKEN = ht.loginIn();
		}
	}


	public void beginTask() {
		try {
			BLRegisterThreadHY tt = new BLRegisterThreadHY(blService,HelloTrueHY.TOKEN);
			tt.start();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
